<template>
    <div>
        <p>我是B组件</p>
        <slot :obj="obj">{{obj.firstName}}</slot>
    </div>
</template>
   
<script>
export default {
    name: 'B',
    data() {
        return {
            obj: {
                firstName: 'leo',
                lastName: 'lion'
            }

        }
    }
}
</script>